package com.itbaizhan.service.impl;

import com.itbaizhan.dao.ItemDao;
import com.itbaizhan.pojo.Item;
import com.itbaizhan.service.BuytimeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author spf
 * @date 2024/3/8
 * @time 16:10
 */

@Service
public class BuytimeServiceImpl implements BuytimeService {

    @Autowired
    private ItemDao itemDao;

    @Override
    public long isBuyaction(String id) {
        Item item = itemDao.findById(id);
        return item.getBuytime().getTime();
    }
}
